-- GENERATED SPELL FOR [Fathom-Guard Caribdis] --


function spell0_21964(pUnit, Event) --@Blessing of the Tides,n/a--
pUnit:FullCastSpellOnTarget(38449,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21964', 645, 1)
end

function spell1_21964(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(38330,pUnit)
pUnit:RegisterEvent('Sorts_21964', 900, 1)
end

function spell2_21964(pUnit, Event) --@Power of Caribdis,n/a--
pUnit:FullCastSpellOnTarget(38451,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21964', 0, 1)
end

function spell3_21964(pUnit, Event) --@Tidal Surge,Self--
pUnit:FullCastSpellOnTarget(38358,pUnit)
pUnit:RegisterEvent('Sorts_21964', 640, 1)
end

function spell4_21964(pUnit, Event) --@Water Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(38335,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21964', 599, 1)
end

function Sorts_21964(pUnit, Event)
local choix_sorts_21964 = math.random(0, 4)
if choix_sorts_21964 == 0 then
pUnit:RegisterEvent('spell0_21964', 1, 1)
end
if choix_sorts_21964 == 1 then
pUnit:RegisterEvent('spell1_21964', 1, 1)
end
if choix_sorts_21964 == 2 then
pUnit:RegisterEvent('spell2_21964', 1, 1)
end
if choix_sorts_21964 == 3 then
pUnit:RegisterEvent('spell3_21964', 1, 1)
end
if choix_sorts_21964 == 4 then
pUnit:RegisterEvent('spell4_21964', 1, 1)
end
end

function mob21964_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21964', math.random(1500, 3000), 1)
end

function mob21964_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21964_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21964_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21964, 1, 'mob21964_Action')
RegisterUnitEvent(21964, 2, 'mob21964_Leave')
RegisterUnitEvent(21964, 3, 'mob21964_Kill')
RegisterUnitEvent(21964, 4, 'mob21964_Die')
